All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.QTSession
java.lang.Object
|
+----quicktime.QTSession
- public final class QTSession
- extends Object
- implements QuickTimeLib, QuickTimeVRLib, QuickDraw3DLib
This class will check if QT is present and provides calls for enterMovies.
This essentially does any initialisation that QT requires.
QTSession.open will intialize QuickTime, do a gestalt check and call enterMovies. Calls
to the initialize routine are accumulative - thus if your code calls QTSession.open (which calls
QTSession.initialize) and/or QTSession.initialize, the current session of QuickTime will only
be closed down when it gets the same number of calls to QTSession.close (which calls QTSession.terminate)
and/or QTSession.terminate.
A typical usage of QTSession calls by an application, applet or bean is: (this gives the applet version)
public class MyApplet extends Applet {
public void init () {
try {
QTSession.open();
...
} catch (QTException e) {
}
}
public void destroy () {
QTSession.close();
}
}
Thus the applet initializes the QTSession in its init method and closes it down in its destroy method.
This ensures that if you have other applets (or beans, etc) that are running in the same process that
the QuickTime session will only be terminated when all of the current Java QTSessions in that process
have been destroyed.
-
kInit3D
- Flags that can be passed in to the open call to also initialise these environments.
-
kInitVR
- Flags that can be passed in to the open call to also initialise these environments.
-
kMacOS
- The list of currently supported operating systems for QTJava.
-
kWin32
- The list of currently supported operating systems for QTJava.
-
addActiveCanvas(QTCanvas)
- Adds a canvas to a registry of active canvases.
-
close()
- This call will close down the QTML environment.
-
enterMovies()
-
Before you call any Movie Toolbox functions, you must initialize the toolbox
QuickTime::EnterMovies()
-
exitMovies()
- QuickTime calls the ExitMovies function automatically when your application quits -
you only need to call thi function if you finish with the Movie Toolbox long
before your application is ready to quit.
-
gestalt(int)
-
This call will do a gestalt check.
-
getBugFixVersion()
- This returns the sub version of QuickTime that is currently present
-
getDeveloperVersion()
- This returns the sub version of QuickTime that is currently present
-
getJavaVersion()
- Return the Java version in the format of:0xVVVVSSSS.
-
getMajorVersion()
- This contains the version of QuickTime that is currently present
-
getMinorVersion()
- This returns the sub version of QuickTime that is currently present
-
getQTMajorVersion()
- This returns the major version of QuickTime
-
getQTMinorVersion()
- This returns the minor version of QuickTime
-
getQTVersion()
- This returns the complete version number of QuickTime
-
initialize(int)
- This call will open a QTSession and perform any initialisations of the QT environment.
-
initialize3D()
-
-
initializeVR()
- This call will initialize QTVR.
-
is3DInitialized()
- This call will return true if the QuickTime Session has been initialized, otherwise false.
-
isCurrentOS(int)
- This method returns true if the passed in OS name is the OS upon which the current session of QuickTime
is running.
-
isInitialized()
- This call will return true if the QuickTime Session has been initialized, otherwise false.
-
isQD3DAvailable()
- Determine whether it is safe to call a QuickDraw 3D API.
-
isQTVRAvailable()
- Determine whether it is safe to call a QuickTime VR API.
-
isVRInitialized()
- This call will return true if the QuickTime Session has been initialized, otherwise false.
-
open()
- This call will open a QTSession and perform any initialisations of the QTML environment.
-
open(int)
- This call will open a QTSession and perform any initialisations of the QTML environment.
-
open(int, int, int)
- This call will open a QTSession and perform any initialisations of the QTML environment.
-
removeActiveCanvas(QTCanvas)
- Removes a canvas from a registry of active canvases.
-
terminate()
- This call will close down the QTML environment, VR and QD3D.
-
terminate3D()
- This call will terminate QuickDraw3D.
-
terminateVR()
- This call will terminate QTVR.
-
terminationLock()
-
kMacOS
public static final int kMacOS
- The list of currently supported operating systems for QTJava.
kWin32
public static final int kWin32
- The list of currently supported operating systems for QTJava.
kInitVR
public static final int kInitVR
- Flags that can be passed in to the open call to also initialise these environments.
kInit3D
public static final int kInit3D
- Flags that can be passed in to the open call to also initialise these environments.
getJavaVersion
public static int getJavaVersion()
- Return the Java version in the format of:0xVVVVSSSS.
- Returns:
- an int
isCurrentOS
public static boolean isCurrentOS(int osName)
- This method returns true if the passed in OS name is the OS upon which the current session of QuickTime
is running.
- Parameters:
- osName - the osName of the system that you want to find out if you are running on.
- Returns:
- true if the current OS is the one as passed in or false if not.
isInitialized
public static boolean isInitialized()
- This call will return true if the QuickTime Session has been initialized, otherwise false.
An application should acquire the termination lock if it is possible that the QTSession has
been terminated or could be terminated whilst this query is being processed.
synchronized (QTSession.terminationLock()) {
if (QTSession.isInitialized()) {
//...
}
}
- Returns:
- true if still initialized
isVRInitialized
public static boolean isVRInitialized()
- This call will return true if the QuickTime Session has been initialized, otherwise false.
is3DInitialized
public static boolean is3DInitialized()
- This call will return true if the QuickTime Session has been initialized, otherwise false.
initialize
public static void initialize(int flag) throws QTException
- This call will open a QTSession and perform any initialisations of the QT environment.
If you use this call (and not the open calls) then you should also ensure that you check
that QT is present through the gestalt call and call enterMovies to initialize the
movie toolbox.
QuickTime::InitializeQTML()
- Parameters:
- flag - flag that are valid for this call.
initializeVR
public static void initializeVR() throws QTException
- This call will initialize QTVR. It must be called before any of the QTVR API calls are made.
QuickTime::InitializeQTVR()
initialize3D
public static void initialize3D() throws QTException
open
public static void open() throws QTException
- This call will open a QTSession and perform any initialisations of the QTML environment.
This will ensure that any required initialisations are performed,
and that the required version of QuickTime is present. The minimal
version of QT that is required is version 3.
This will also call EnterMovies.
QuickTime::InitializeQTML()
QuickTime::Gestalt()
QuickTime::EnterMovies()
open
public static void open(int initFlag) throws QTException
- This call will open a QTSession and perform any initialisations of the QTML environment.
This will ensure that any required initialisations are performed,
and that the required version of QuickTime is present. The minimal
version of QT that is required is version 3. You can set the initialisation options
to also have this call initialise QuickTimeVR and/or QuickDraw3D.
- Parameters:
- initFlag - can also initialise VR or 3D.
This will also call EnterMovies.
QuickTime::InitializeQTML()
QuickTime::Gestalt()
QuickTime::EnterMovies()
open
public static void open(int version,
int minorVersion,
int initFlag) throws QTException
- This call will open a QTSession and perform any initialisations of the QTML environment.
You can optionally open a session where the specified minimal
version and minorVersion of QT must be present or an exception will be
thrown.
This will also call EnterMovies for you.
QuickTime::InitializeQTML()
QuickTime::Gestalt()
QuickTime::EnterMovies()
- Parameters:
- version - the minimal version of QT that must be present
- minorVersion - the minimal minorVersion of QT that must be present
- initFlag - can also initialise VR or 3D.
close
public static void close()
- This call will close down the QTML environment.
This call should not be called from one of the quicktime.app.time.TaskThread objects
as a side effect of this call is stopping all thread that belong to the TaskThread group.
- See Also:
- terminate
terminate
public static void terminate()
- This call will close down the QTML environment, VR and QD3D. This
will mean that the QTML environment will need to be reinitialised before it can be
used again.
This call should not be called from one of the quicktime.app.time.TaskThread objects
as a side effect of this call is stopping all thread that belong to the TaskThread group.
QuickTime::TerminateQTML()
terminationLock
public static Object terminationLock()
terminateVR
public static void terminateVR()
- This call will terminate QTVR. You cannot call QTVR API's after you make this call unless you
reinitialize QTVR first. QTSession.close will terminate VR if it has been initialized.
QuickTime::TerminateQTVR()
terminate3D
public static void terminate3D()
- This call will terminate QuickDraw3D. You cannot call QD3D API's after you make this call unless you
reinitialize QD3D first. QTSession.close will terminate 3D if it has been initialized.
QuickTime::Q3Exit()
isQD3DAvailable
public static boolean isQD3DAvailable() throws StdQTException
- Determine whether it is safe to call a QuickDraw 3D API.
QuickTime::Gestalt(gestaltQD3D,result)
isQTVRAvailable
public static boolean isQTVRAvailable() throws StdQTException
- Determine whether it is safe to call a QuickTime VR API.
QuickTime::Gestalt(gestaltQTVRMgrAttr,result)
gestalt
public static final int gestalt(int selector) throws StdQTException
- This call will do a gestalt check. If you are on a non-Macintosh machine this
call will also initialise QTML if that has not already been done.
It will return the result value if the gestalt check is successful,
QuickTime::Gestalt()
- Parameters:
- selector - the selector code for the information you need.
enterMovies
public static final void enterMovies() throws QTException
- Before you call any Movie Toolbox functions, you must initialize the toolbox
QuickTime::EnterMovies()
exitMovies
public static final void exitMovies()
- QuickTime calls the ExitMovies function automatically when your application quits -
you only need to call thi function if you finish with the Movie Toolbox long
before your application is ready to quit.
QuickTime::ExitMovies()
getMajorVersion
public static final int getMajorVersion()
- This contains the version of QuickTime that is currently present
getMinorVersion
public static final int getMinorVersion()
- This returns the sub version of QuickTime that is currently present
getBugFixVersion
public static final int getBugFixVersion()
- This returns the sub version of QuickTime that is currently present
getDeveloperVersion
public static final int getDeveloperVersion()
- This returns the sub version of QuickTime that is currently present
getQTVersion
public static int getQTVersion()
- This returns the complete version number of QuickTime
getQTMajorVersion
public static int getQTMajorVersion()
- This returns the major version of QuickTime
getQTMinorVersion
public static int getQTMinorVersion()
- This returns the minor version of QuickTime
addActiveCanvas
public static void addActiveCanvas(QTCanvas c)
- Adds a canvas to a registry of active canvases. You should not need to
call this method.
removeActiveCanvas
public static void removeActiveCanvas(QTCanvas c)
- Removes a canvas from a registry of active canvases. You should not need to
call this method.
All Packages Class Hierarchy This Package Previous Next Index